home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsISVGGlyphGeometrySource.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  188 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISVGGlyphGeometrySource.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISVGGlyphGeometrySource_h__
  6. #define __gen_nsISVGGlyphGeometrySource_h__
  7.  
  8.  
  9. #ifndef __gen_nsISVGGlyphMetricsSource_h__
  10. #include "nsISVGGlyphMetricsSource.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISVGRendererGlyphMetrics; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsISVGGlyphGeometrySource */
  21. #define NS_ISVGGLYPHGEOMETRYSOURCE_IID_STR "b36065f1-c52b-4eda-b9ad-e483cf1a63bf"
  22.  
  23. #define NS_ISVGGLYPHGEOMETRYSOURCE_IID \
  24.   {0xb36065f1, 0xc52b, 0x4eda, \
  25.     { 0xb9, 0xad, 0xe4, 0x83, 0xcf, 0x1a, 0x63, 0xbf }}
  26.  
  27. /**
  28.  * \addtogroup rendering_backend_interfaces Rendering Backend Interfaces
  29.  * @{
  30.  */
  31. /**
  32.  * Abstracts a description of a 'composite glyph' (character string
  33.  * with associated font and styling information) in the SVG rendering
  34.  * backend for use by a rendering engine's nsISVGRendererGlyphGeometry
  35.  * objects. In addition to the attributes of the
  36.  * nsISVGGlyphMetricsSource interface, this interface contains
  37.  * absolute positioning and other information, such as e.g. individual
  38.  * character highlighting, which doesn't affect the actual metrics of
  39.  * the glyph. The metrics of the glyph, as given by the rendering
  40.  * engine-native object implementing nsISVGRendererGlyphMetrics are
  41.  * also provided as an attribute.
  42.  *
  43.  * An engine-native glyph geometry object will be informed of changes
  44.  * in its associated composite glyph with a call to its
  45.  * nsISVGRendererGlyphMetrics::update() method with an OR-ed
  46.  * combination of the UPDATEMASK_* constants defined in this interface
  47.  * (and its base-interface).
  48.  *
  49.  * @nosubgrouping
  50.  */
  51. class NS_NO_VTABLE nsISVGGlyphGeometrySource : public nsISVGGlyphMetricsSource {
  52.  public: 
  53.  
  54.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISVGGLYPHGEOMETRYSOURCE_IID)
  55.  
  56.   /**
  57.    * @name Glyph metrics
  58.    * @{
  59.    */
  60.   /* readonly attribute nsISVGRendererGlyphMetrics metrics; */
  61.   NS_IMETHOD GetMetrics(nsISVGRendererGlyphMetrics * *aMetrics) = 0;
  62.  
  63.   enum { UPDATEMASK_METRICS = 262144U };
  64.  
  65.   /** @} */
  66. /**
  67.    * @name Glyph start position
  68.    * @{
  69.    */
  70.   /* readonly attribute float x; */
  71.   NS_IMETHOD GetX(float *aX) = 0;
  72.  
  73.   enum { UPDATEMASK_X = 524288U };
  74.  
  75.   /* readonly attribute float y; */
  76.   NS_IMETHOD GetY(float *aY) = 0;
  77.  
  78.   enum { UPDATEMASK_Y = 1048576U };
  79.  
  80.   /** @} */
  81. /**
  82.    * @name Partial highlighting for selection feedback
  83.    * @{
  84.    */
  85.   /* readonly attribute boolean hasHighlight; */
  86.   NS_IMETHOD GetHasHighlight(PRBool *aHasHighlight) = 0;
  87.  
  88.   enum { UPDATEMASK_HAS_HIGHLIGHT = 2097152U };
  89.  
  90.   /* [noscript] void getHighlight (out unsigned long charnum, out unsigned long nchars, out nscolor foreground, out nscolor background); */
  91.   NS_IMETHOD GetHighlight(PRUint32 *charnum, PRUint32 *nchars, nscolor *foreground, nscolor *background) = 0;
  92.  
  93.   enum { UPDATEMASK_HIGHLIGHT = 4194304U };
  94.  
  95. };
  96.  
  97. /* Use this macro when declaring classes that implement this interface. */
  98. #define NS_DECL_NSISVGGLYPHGEOMETRYSOURCE \
  99.   NS_IMETHOD GetMetrics(nsISVGRendererGlyphMetrics * *aMetrics); \
  100.   NS_IMETHOD GetX(float *aX); \
  101.   NS_IMETHOD GetY(float *aY); \
  102.   NS_IMETHOD GetHasHighlight(PRBool *aHasHighlight); \
  103.   NS_IMETHOD GetHighlight(PRUint32 *charnum, PRUint32 *nchars, nscolor *foreground, nscolor *background); \
  104.  
  105. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  106. #define NS_FORWARD_NSISVGGLYPHGEOMETRYSOURCE(_to) \
  107.   NS_IMETHOD GetMetrics(nsISVGRendererGlyphMetrics * *aMetrics) { return _to GetMetrics(aMetrics); } \
  108.   NS_IMETHOD GetX(float *aX) { return _to GetX(aX); } \
  109.   NS_IMETHOD GetY(float *aY) { return _to GetY(aY); } \
  110.   NS_IMETHOD GetHasHighlight(PRBool *aHasHighlight) { return _to GetHasHighlight(aHasHighlight); } \
  111.   NS_IMETHOD GetHighlight(PRUint32 *charnum, PRUint32 *nchars, nscolor *foreground, nscolor *background) { return _to GetHighlight(charnum, nchars, foreground, background); } \
  112.  
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  114. #define NS_FORWARD_SAFE_NSISVGGLYPHGEOMETRYSOURCE(_to) \
  115.   NS_IMETHOD GetMetrics(nsISVGRendererGlyphMetrics * *aMetrics) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMetrics(aMetrics); } \
  116.   NS_IMETHOD GetX(float *aX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetX(aX); } \
  117.   NS_IMETHOD GetY(float *aY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetY(aY); } \
  118.   NS_IMETHOD GetHasHighlight(PRBool *aHasHighlight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasHighlight(aHasHighlight); } \
  119.   NS_IMETHOD GetHighlight(PRUint32 *charnum, PRUint32 *nchars, nscolor *foreground, nscolor *background) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHighlight(charnum, nchars, foreground, background); } \
  120.  
  121. #if 0
  122. /* Use the code below as a template for the implementation class for this interface. */
  123.  
  124. /* Header file */
  125. class nsSVGGlyphGeometrySource : public nsISVGGlyphGeometrySource
  126. {
  127. public:
  128.   NS_DECL_ISUPPORTS
  129.   NS_DECL_NSISVGGLYPHGEOMETRYSOURCE
  130.  
  131.   nsSVGGlyphGeometrySource();
  132.  
  133. private:
  134.   ~nsSVGGlyphGeometrySource();
  135.  
  136. protected:
  137.   /* additional members */
  138. };
  139.  
  140. /* Implementation file */
  141. NS_IMPL_ISUPPORTS1(nsSVGGlyphGeometrySource, nsISVGGlyphGeometrySource)
  142.  
  143. nsSVGGlyphGeometrySource::nsSVGGlyphGeometrySource()
  144. {
  145.   /* member initializers and constructor code */
  146. }
  147.  
  148. nsSVGGlyphGeometrySource::~nsSVGGlyphGeometrySource()
  149. {
  150.   /* destructor code */
  151. }
  152.  
  153. /* readonly attribute nsISVGRendererGlyphMetrics metrics; */
  154. NS_IMETHODIMP nsSVGGlyphGeometrySource::GetMetrics(nsISVGRendererGlyphMetrics * *aMetrics)
  155. {
  156.     return NS_ERROR_NOT_IMPLEMENTED;
  157. }
  158.  
  159. /* readonly attribute float x; */
  160. NS_IMETHODIMP nsSVGGlyphGeometrySource::GetX(float *aX)
  161. {
  162.     return NS_ERROR_NOT_IMPLEMENTED;
  163. }
  164.  
  165. /* readonly attribute float y; */
  166. NS_IMETHODIMP nsSVGGlyphGeometrySource::GetY(float *aY)
  167. {
  168.     return NS_ERROR_NOT_IMPLEMENTED;
  169. }
  170.  
  171. /* readonly attribute boolean hasHighlight; */
  172. NS_IMETHODIMP nsSVGGlyphGeometrySource::GetHasHighlight(PRBool *aHasHighlight)
  173. {
  174.     return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176.  
  177. /* [noscript] void getHighlight (out unsigned long charnum, out unsigned long nchars, out nscolor foreground, out nscolor background); */
  178. NS_IMETHODIMP nsSVGGlyphGeometrySource::GetHighlight(PRUint32 *charnum, PRUint32 *nchars, nscolor *foreground, nscolor *background)
  179. {
  180.     return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182.  
  183. /* End of implementation class template. */
  184. #endif
  185.  
  186.  
  187. #endif /* __gen_nsISVGGlyphGeometrySource_h__ */
  188.